use tauri::{Error, Window, WindowBuilder, WindowUrl};

use crate::state;

/// 构建主窗口
pub(crate) fn build_main_window() -> Result<Window, Error> {
    let app = state::application::application().app();

    // 创建主窗口
    let mut builder = WindowBuilder::new(app, "main", WindowUrl::App("/endpoint".into()));
    builder = builder.decorations(false).min_inner_size(800f64, 600f64).inner_size(1280f64, 900f64).center();

    Ok(builder.build()?)
}